package defectsim;

import repast.simphony.space.grid.Grid;
import repast.simphony.space.grid.GridAdder;
import repast.simphony.space.grid.GridDimensions;

@SuppressWarnings("hiding")
public class DefectGridAdder<DefectAgent> implements GridAdder<Located>{

	@Override
	public void add(Grid<Located> grid, Located object) {
		GridDimensions dims = grid.getDimensions();
		int[] location = new int[dims.size()];
		location[0] = object.getGridX();
		location[1] = object.getGridY();
		grid.moveTo(object, location);
		
	}

}
